<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>门禁记录</title>
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen"/>
    <script src="../lib/jquery-3.3.1.min.js" type="text/javascript"></script>
    <script src="../lib/layui/layui.js" type="text/javascript"></script>
    <script src="../js/record/acsRecord.js" type="text/javascript"></script>
    <script src="../lib/jquery.qrcode.min.js" type="text/javascript"></script>
    <script type="text/html" id="toolbarDemo">
        <div class="layui-btn-container">
            <button class="layui-btn layui-btn-sm" lay-event="add">添加</button>
        </div>
    </script>
    <style>
        .wd550{
            width: 550px;
        }
        .wd200{
            width: 200px;
        }
    </style>
</head>
<body class="layui-layout-body" style="background-color: white">
<div class="layui-layout layui-layout-admin">
<!--    <div th:replace="common/include :: basicHeader"></div>-->
<!--    <div th:replace="common/include :: basicLeft(activeUri='record')"></div>-->
<!--    <div style="margin-left: 200px;padding: 5px;">-->
        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
            <ul class="layui-tab-title">
                <li class="layui-this">开门记录</li>
                <li>抓拍记录</li>
                <li>随机二维码生成记录</li>
                <li>随机数字密码生成记录</li>
                <li>账户信息配置</li>
                <li>数据同步频率设置</li>
            </ul>

            <div class="layui-tab-content">
                <!-- -------------   开门记录begin  ------------------->
                <div class="layui-tab-item layui-show">
                    <form class="layui-form" id="openForm">
                        <label>所在小区:</label>
                        <div class="layui-input-inline">
                            <select id="communityLocation" lay-filter="communityLocation" lay-search=""></select>
                        </div>
                        <label>所在楼栋:</label>
                        <div class="layui-input-inline">
                            <select id="buildingLocation" lay-filter="buildingLocation" lay-search=""></select>
                        </div>
                        <label>用户类型:</label>
                        <div class="layui-input-inline">
                            <select id="userType" lay-filter="userType">
                                <option value="">全部</option>
                                <option value="11">业主</option>
                                <option value="12">家庭成员</option>
                                <option value="13">租客</option>
                            </select>
                        </div>
                        <label>开门时间:</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" id="openBeginDate">
                        </div>
                        至
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" id="openEndDate">
                        </div>
                        <div class="layui-input-inline">
                            <input id="gateLocakName" class="layui-input" placeholder="请输入门禁名称">
                        </div>
                        <div class="layui-input-inline">
                            <button class="layui-btn" lay-submit="" lay-filter="openQuery">查询</button>
                            <button class="layui-btn layui-btn-primary" onclick="reloadOpenRecord()" type="button">重置</button>
                            <button class="layui-btn layui-btn-normal" type="button" id="updateData">更新数据</button>
                        </div>
                    </form>
                    <table id="openTable" lay-filter="openTable"></table>
                </div>
                <!-- -------------   抓拍记录begin  ------------------->
                <div class="layui-tab-item">
                    <form class="layui-form" id="candidPhotoForm">
                        <label>所在小区:</label>
                        <div class="layui-input-inline">
                            <select id="communityLocationc" lay-filter="communityLocationc" lay-search=""></select>
                        </div>
<!--                        <label>所在楼栋:</label>-->
<!--                        <div class="layui-input-inline">-->
<!--                            <select id="buildingLocation2" lay-filter="buildingLocation2"></select>-->
<!--                        </div>-->
                        <label>门禁名称:</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input id="gateLocakName2" class="layui-input" placeholder="输入门禁名称">
                        </div>
                        <label>抓拍时间:</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" id="openBeginDate2">
                        </div>
                        至
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" id="openEndDate2">
                        </div>
                        <div class="layui-input-inline">
                            <button class="layui-btn" lay-submit="" lay-filter="candidPhotoQuery">查询</button>
                            <button class="layui-btn layui-btn-primary" onclick="resetCandidPhoto()" type="button">重置</button>
<!--                            <button class="layui-btn layui-btn-normal" type="button" id="updateData2">更新数据</button>-->
                        </div>
                    </form>
                    <table id="candidPhotoTable" lay-filter="candidPhotoTable"></table>
                </div>
                <!-- -------------   开门记录 end  ------------------->
                <!-- -------------   二维码记录 begin  ------------------->
                <div class="layui-tab-item">
                    <form class="layui-form" id="qrcodeForm">
                        <label>操作时间:</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" id="qrcodeBeginDate">
                        </div>
                        至
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" id="qrcodeEndDate">
                        </div>
                        <div class="layui-input-inline">
                            <input id="opUserName" class="layui-input" placeholder="操作用户名称">
                        </div>
                        <div class="layui-input-inline">
                            <button class="layui-btn" lay-submit="" lay-filter="qrcodeQuery">查询</button>
                            <button class="layui-btn layui-btn-primary" onclick="reloadQrcode()" type="button">重置</button>
                        </div>
                    </form>
                    <table id="qrcodeTable" lay-filter="qrcodeTable"></table>
                </div>
                <!-- -------------   二维码记录 end  ------------------->
                <!-- -------------   随机数字记录 begin  ------------------->
                <div class="layui-tab-item">
                    <form class="layui-form" id="randNumForm">
                        <label>操作时间:</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" id="randNumBeginDate">
                        </div>
                        至
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" id="randNumEndDate">
                        </div>
                        <div class="layui-input-inline">
                            <input id="randNumUserName" class="layui-input" placeholder="操作用户名称">
                        </div>
                        <div class="layui-input-inline">
                            <button class="layui-btn" lay-submit="" lay-filter="randNumQuery">查询</button>
                            <button class="layui-btn layui-btn-primary" onclick="reloadrandNum()" type="button">重置</button>
                        </div>
                    </form>
                    <table id="randNumTable" lay-filter="randNumTable"></table>
                </div>
                <!-- -------------   随机数字记录 end  ------------------->

                <!-- -------------   账户信息配置  ------------------->
                <div class="layui-tab-item">
                    <form class="layui-form">
                        <div class="layui-form">
                            <p style="font-size: large;margin-bottom: 20px;margin-top: 10px" class="text-center" >如要维护基础信息及获取门禁记录等须要配置平台申请的appid,appsecret及绑定的手机号码</p>
                            <div >
                                <div class="layui-form-item">
                                    <div class="layui-input-block" style="display: table;width: 550px">
                                        <a class="ml150 text-light-blue" href="http://juren.iop.easyto.cc/#/login" target="_blank">还没账号信息？前往平台并联系相关人员申请</a>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label wd160">appid:</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-input-inline" >
                                            <input id="appid" name="appid" lay-verify="required" class="layui-input wd550" placeholder="输入appid" />
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label wd160">appsecret:</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-input-inline" >
                                            <input id="appsecret" name="appsecret" lay-verify="required" class="layui-input wd550" placeholder="输入appsecret" />
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label wd160">手机号码:</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-input-inline" >
                                            <input id="phone" name="phone" lay-verify="required" class="layui-input wd550" placeholder="输入手机号码" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div style="margin-left: 20%">
                            <div class="layui-input-inline">
                                <button class="layui-btn"  lay-submit="" lay-filter="saveOrUpdate">保存/更新</button>
                            </div>
                        </div>
                    </form>
                </div>
                <!-- -------------   数据同步频率设置  ------------------->
                <div class="layui-tab-item">
                    <form class="layui-form">
                        <div class="layui-form">
                            <p style="font-size: large;margin-bottom: 20px;margin-top: 10px" class="text-center" >开门记录和抓拍记录的同步频率均是20分钟一次，同步频率设置过低有可能导致数据同步不成功，建议不做更改。</p>
                            <div >
                                <div class="layui-form-item">
                                    <label class="layui-form-label wd200">开门记录同步频率(分钟/次):</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-input-inline" >
                                            <input id="openSyncFre" name="openSyncFre" lay-verify="validateFrequency"  class="layui-input" placeholder="请输入正整数" />
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label wd200">抓拍记录同步频率(分钟/次):</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-input-inline" >
                                            <input id="capSyncFre" name="capSyncFre" lay-verify="validateFrequency" class="layui-input" placeholder="请输入正整数" />
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                        <div style="margin-left: 12%">
                            <div class="layui-input-inline">
                                <button class="layui-btn"  lay-submit="" lay-filter="saveOrUpdateFre">保存/更新</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
<!--    </div>-->
</div>
</body>
<div style="display: none" id="updateOpenRecord" >
    <form class="layui-form" style="margin: 10px">
        <label class="layui-form-label">开门时间:</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" id="openBeginDate3">
        </div>
        至
        <div class="layui-input-inline">
            <input type="text" class="layui-input" id="openEndDate3">
        </div>
        <label class="layui-form-label" >所在小区:</label>
        <div class="layui-input-inline" style="margin-top: 5px">
            <select id="communityLocation2" lay-filter="communityLocation2" lay-search=""></select>
        </div>
        <div class="layui-input-inline" >
            <button class="layui-btn layui-btn-normal"  lay-submit="" lay-filter="updateData">更新数据</button>
        </div>
    </form>
</div>
<div style="display: none" id="updateCaptureRecord">
    <form class="layui-form" style="margin: 10px">
        <label class="layui-form-label">抓拍时间:</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" id="openBeginDate4">
        </div>
        至
        <div class="layui-input-inline">
            <input type="text" class="layui-input" id="openEndDate4">
        </div>
        <label class="layui-form-label">所在小区:</label>
        <div class="layui-input-inline" style="margin-top: 5px">
            <select id="communityLocation3" lay-filter="communityLocation3" lay-search=""></select>
        </div>
        <div class="layui-input-inline">
            <button class="layui-btn layui-btn-normal"  lay-submit="" lay-filter="updateData2">更新数据</button>
        </div>
    </form>
</div>
</html>